package com.chixing.Server.imp;

import com.chixing.Mapper.CameraMapper;
import com.chixing.Server.CameraServer;
import com.chixing.pojo.Camera;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CameraServerImp implements CameraServer {
    @Autowired
    private CameraMapper cameraMapper;
    @Override
    public Camera queryById(String id) {
        return cameraMapper.queryById(id);
    }
    @Override
    public List<Camera> queryAllByLimit(int start, int pageSize) {
        start=start-1;
        return cameraMapper.queryAllByLimit(start,pageSize);
    }
    @Override
    public List<Camera> queryByBrandPage(String brand, int start, int pageSize) {
        start=start-1;
        return cameraMapper.queryByBrandPage(brand,start,pageSize);
    }

    @Override
    public List<Camera> queryListByName(String name) {
        return cameraMapper.queryListByName(name);
    }
}
